<extend name="base"/>

<block name="extend">
<script language="javascript">
      $(document).ready(product_obj.product_list); 
</script>

</block>


<block name="body">

<div id="news" class="r_con_wrap">
		<div class="control_btn">
	 		<a href="{:U('add_product')}" class="btn_green btn_w_120">添加商品</a>    
		</div>
        <form class="r_con_search_form" id="search_form" action="{:U('list_product')}" method="post">
			时间：<input name="Time" value="{$time}" type="text" class="form_input" size="20" readonly="readonly">
			关键字：<input name="Keyword" value="{$keyword}" type="text" class="form_input" placeholder=" 商品名称" size="15" >
			<input type="submit" class="search_btn" id="search_btn" value="搜索">
			<!-- <a href="{:U('Merchant/productExport')}"><input type="button" class="search_btn" id="export_btn" value="导出"></a> -->
		</form> 
        
        <table border="0" cellpadding="5" cellspacing="0" class="r_con_table">
            <thead>
                <tr>
                    <td width="10%" nowrap="nowrap">序号</td>
                    <td width="15%" nowrap="nowrap">商品名称</td>
                    <td width="10%" nowrap="nowrap">封面图</td>
                    <td width="15%" nowrap="nowrap">市场价</td>
                    
                    <td width="10%" nowrap="nowrap">发布状态</td>
                    <td width="10%" nowrap="nowrap" class="last">操作</td>
                </tr>
            </thead>
            <tbody>
                <foreach name="productlist" item="v" key="k">
                <tr >
                    <td nowrap="nowrap">{$k+1}</td>
                    <td nowrap="nowrap">{$v.name}</td>
                    <td nowrap="nowrap"><img src="{$v.coverimg}" width="50" height="50"></td>
                    <td nowrap="nowrap">{$v.oriprice}元</td>
                  	
                     <td nowrap="nowrap">
                     	<if condition="$v.ispublish eq 0">
                     	未发布
                     	<else />
                     	已发布
                     	</if>
                     </td>
                    <td class="last" nowrap="nowrap">
                        <a href="{:U('add_product',array('id'=>$v['id']))}"><img src="__PUBLIC__/Member/images/ico/mod.gif" align="absmiddle" alt="修改"  title="修改"/></a>
                         <if condition="$v.ispublish eq 0"><a href="{:U('publish_product',array('id'=>$v['id']))}"><img src="__PUBLIC__/Member/images/ico/duigou.png" align="absmiddle" alt="发布"  title="发布"/></a><else /><a href="{:U('npublish_product',array('id'=>$v['id']))}"><img src="__PUBLIC__/Member/images/ico/cancel.png" align="absmiddle" alt="取消发布"  title="取消发布"/></a></if>
                        <a href="{:U('delete_product',array('id'=>$v['id']))}" title="删除" onClick="if(!confirm('删除后不可恢复，继续吗？')){return false};"><img src="__PUBLIC__/Member/images/ico/del.gif" align="absmiddle" /></a>
                    </td>
                </tr>
                </foreach>
            </tbody>
        </table>
        <div class="blank20"></div>
        <div id="turn_page">{$page}</div>
    </div>  

    </block>